package model

import "gorm.io/gorm"

type ModelInfo struct {
	gorm.Model
	Name                   string `gorm:"column:name;type:varchar(255);not null;uniqueIndex" json:"name"`
	Category               string `gorm:"column:category;type:varchar(255);not null" json:"category"`
	Type                   string `gorm:"column:type;type:varchar(20);not null" json:"type"` // "Online" or "SelfBuild"
	Description            string `gorm:"column:description;type:text" json:"description"`
	GrpcExecutableFileName string `gorm:"column:grpc_executable_file_name;type:text" json:"grpc_executable_file_name"`
	GrpcArguments          string `gorm:"column:grpc_arguments;type:text" json:"grpc_arguments"`
	Status                 string `gorm:"column:status;type:varchar(20);not null;default:'pending'" json:"status"`
}

func (ModelInfo) TableName() string {
	return "model_info"
}
